home *** CD-ROM | disk | FTP | other *** search
- /*
- File: EnetShim.h
-
- Contains: xxx put contents here xxx
-
- Version: xxx put version here xxx
-
- Copyright: © 2000 by Apple Computer, Inc., all rights reserved.
-
- */
-
- #ifndef _ENETSHIM_
- #define _ENETSHIM_
-
- // Shim definitions etc.
-
- typedef UInt32 ShimRefNum;
-
- #define kInvalidRef -1
-
- #define Shim_Validate "\pEnetMac_ValidateHW"
- #define Shim_Entry "\pEnetMac_ShimEntry"
- #define Shim_Install "\pEnetShimInstallDriver"
- #define Shim_Remove "\pEnetShimRemoveDriver"
- #define Shim_Async "\pEnetShimAsyncStatus"
-
- // Shim interface structure(s)
-
- typedef struct EnetShimInterface
- {
- StringPtr DRVName;
- CFragConnectionID ConnID;
- UInt32 RefCon;
- UInt32 theID;
-
- } EnetShimInterface;
-
- typedef struct USBEnet
- {
- ShimRefNum ioRefNum;
- void *ioBuffer;
- UInt32 ioReqCount;
- UInt32 ioActCount;
- ProcPtr ioCompletion;
- void *ioMisc;
- OSErr ioResult;
-
- } USBEnet;
- typedef USBEnet *USBEnetPtr;
-
- // Hardware abstraction (selector) codes
-
- enum
- {
- EnetHAL_RegisterPorts = 0,
-
- EnetHAL_Open = 1,
- EnetHAL_Close = 2,
-
- EnetHAL_Start = 3,
- EnetHAL_Stop = 4,
-
- EnetHAL_Read = 5,
- EnetHAL_Write = 6,
-
- EnetHAL_GetMACAddress = 7,
- EnetHAL_SetMACAddress = 8,
- EnetHAL_SetMulticastFilters = 9,
-
- EnetHAL_Status = 10
-
- };
-
-
- // statistics selector codes
- enum
- {
- kTxFrames = 1,
- kRxFrames = 2,
- kTxErrors = 3,
- kRxErrors = 4,
-
- kRxCRCErrors = 5,
- kTxQueueLength = 6,
- kRxAlignErrors = 7,
- kTxOneCollision = 8,
-
- kTxMultipleCollision = 9,
- kTxDeferred = 10,
- kTxTooManyCollisions = 11,
- kRxOverrun = 12,
-
- kTxUnderrun = 13,
- kNoCarrierSense = 14,
- kLateCollisions = 15
-
- };
-
- // Driver abstraction (selector) codes
-
- enum
- {
- EnetShim_Link = 0,
- EnetShim_Speed = 1,
- EnetShim_Error = 2
-
- };
-
- #endif
-